<template>
  <div>
    <CategorySelector :disabled="isShow !== 1" />
    <SpuList v-if="isShow === 1" @setIsShow="setIsShow" />
    <AddSpuList v-else-if="isShow === 2" @setIsShow="setIsShow" />
    <AddSku v-else @setIsShow="setIsShow" />
  </div>
</template>

<script lang="ts">
export default {
  name: "XSpu",
};
</script>

<script lang="ts" setup>
import { ref } from "vue";
import CategorySelector from "@/components/CategorySelector/index.vue";
import SpuList from "./components/SpuList.vue";
import AddSpuList from "./components/AddSpuList.vue";
import AddSku from "./components/AddSku .vue";

const isShow = ref(1);

const setIsShow = (newVal: number) => {
  isShow.value = newVal;
};
</script>

<style scoped></style>
